package edu.guet.Factory.FactoryMethod;

import edu.guet.Factory.PizzaType;

/**
 * Created by Caesar on 2017/5/6.
 */
public abstract class PizzaStore {

    public PizzaStore(){
    }

    public Pizza orderPizza(PizzaType type) {
        Pizza pizza = createPizza(type);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }

    public abstract Pizza createPizza(PizzaType type);
}
